package org.matchergen.apt;

import java.util.Iterator;
import java.util.List;

import com.sun.codemodel.JClass;
import com.sun.codemodel.JFormatter;
import com.sun.codemodel.JPackage;
import com.sun.codemodel.JTypeVar;

public class SuperWildcard extends JClass {
	private JClass bound;

	public SuperWildcard(JClass bound) {
		super(bound.owner());

		this.bound = bound;
	}

	@Override
	public String name() {
		return "? super " + bound.name();
	}

	@Override
	public String fullName() {
		return "? super " + bound.fullName();
	}

	@Override
	public void generate(JFormatter f) {
		if (bound._extends() == null)
			f.p("?"); // instead of "? extends Object"
		else
			f.p("? super").g(bound);
	}

	@Override
	public JPackage _package() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public JClass _extends() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Iterator<JClass> _implements() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public boolean isInterface() {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean isAbstract() {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	protected JClass substituteParams(JTypeVar[] variables, List<JClass> bindings) {
		// TODO Auto-generated method stub
		return null;
	}

}
